import { Component } from "react";
import {
  Button,
  Cell,
  Empty,
  Avatar,
  Grid,
  Image,
  Tabs,
} from "@nutui/nutui-react-taro";
import styles from "./index.scss";
import { useModel } from "@/store";
import Taro from "@tarojs/taro";
import { useState } from "react";
import { useEffect } from "react";
import { queryOutpAcctInfo } from "@/services/payment";
// import { IconFont } from "@nutui/icons-react-taro";
export default () => {
  const { user, getUser } = useModel("user");
  const { curPatientInfo } = useModel("patient");
  const [list, setList] = useState([]);
  //   queryType	查询方式	字符串	1	否	1：病人标识号2：医保个人编号
  // queryNo	查询号	字符串	20	否
  useEffect(() => {
    getList();
  }, []);
  // unitsCode	单位编码
  // startDate	开始日期
  // endDate	结束日期
  // patientId	门诊号
  // payWay	支付方式
  // dataSource	数据来源
  // pageSize	一页显示多少行
  // pageNo	第几页
  const getList = () => {
    queryOutpAcctInfo({
      startDate: "1997-01-01",
      endDate: "2222-01-01",
      queryType: "1",
      // patientId: curPatientInfo.patientId,
      pageSize: 10,
      pageNo: 1,
    }).then((res) => {
      setList(res);
    });
  };

  return (
    <view className={styles.notPaymentListWarp}>
      123
      {/* {list.map((item) => {
        return (
          <view
            key={item.visitSerialNo}
            className={styles.paymentCard}
            onClick={() => {
              Taro.navigateTo({
                url: `/pages/payment/paymentDetail/index?visitSerialNo=${item.visitSerialNo}&visitDoctor=${item.visitDoctor}&visitDept=${item.visitDept}&visitDate=${item.visitDate}&totalCosts=${item.totalCosts}`,
              });
            }}
          >
            <view className={styles.content}>
              <view className={styles.text}>
                就诊科室：{item.visitDeptName}
              </view>
              <view className={styles.text}>就诊时间：{item.visitDate}</view>
            </view>
            <view className={styles.bottom}>
              <view className={styles.price}>￥{item.totalCosts}</view>
              <view className={styles.action}> 去支付{">"}</view>
            </view>
          </view>
        );
      })} */}
    </view>
  );
};
